<?php
namespace App\Repositories;

use App\Interfaces\OrderGoodsService;
use App\Models\OrderGoods;

use DB;

class OrderGoodsRepository  implements OrderGoodsService{

    /**
     * 根据订单商品表id查询订单商品信息
     *
     * param order_id:要查询的订单商品表id
     *
     * @date:2016/02/26
     * @author Leen
     */
    public function getByOrderGoodsId($id){
        $order_goods = OrderGoods::findOrNew($id);

        return $order_goods;
    }

    public function getOrderGoodsById($id){
        $orderGoods = OrderGoods::where('order_id',$id)->get()->toArray();
        return $orderGoods;
    }



}